/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package satk.beans;

/**
 * <h3>ProcessBeansResponces.java</h3>
 * <div><em>Fecha de creación: 25/05/2011, 11:30:59 PM.</em></div>
 * <p></p>
 * @author Sergio Flores Genis <sf.cancun@gmail.com>
 */
public final class ProcessBeansResponces
        implements satk.beans.interfaces.IntProcessResponcesBeans {

    protected int resultCode = -1;
    protected String resultMessage = "";
    protected boolean result = false;
    protected boolean resultError = false;

    public ProcessBeansResponces() {
        super();
    }

    @Override
    public int getResultCode() {
        return resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }
    

    @Override
    public String getResultMessage() {
        return resultMessage;
    }

    public void setResultMessage(String resultMessage) {
        this.resultMessage = resultMessage;
    }
    
    @Override
    public boolean isResult() {
        return result;
    }

    public void setResult(boolean result) {
        this.result = result;
    }

    public boolean isResultError() {
        return resultError;
    }

    public void setResultError(boolean resultError) {
        this.resultError = resultError;
    }
    
    @Override
    public String getIconResult() {
        if (result) {
            return (resultError) ? "ui-icon-alert" : "ui-icon-info";
        } else {
            return null;
        }
    }

    @Override
    public String getStateResult() {
        if (result) {
            return (resultError) ? "ui-state-error" : "ui-state-highlight";
        } else {
            return null;
        }
    }
}
